﻿namespace Nop.Plugin.Payments.UsaEpay
{
    #region

    using System;

    using Autofac;

    using Nop.Core.Infrastructure;
    using Nop.Core.Infrastructure.DependencyManagement;

    #endregion

    /// <summary>
    ///     The USA ePay service registrar.
    /// </summary>
    public class UsaEpayServiceRegistrar : IDependencyRegistrar
    {
        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="UsaEpayServiceRegistrar"/> class.
        /// </summary>
        public UsaEpayServiceRegistrar()
        {
            this.Order = 0;
        }

        #endregion

        #region Public Properties

        /// <summary>
        /// Gets the order.
        /// </summary>
        public int Order { get; private set; }

        #endregion

        #region Public Methods and Operators

        /// <summary>
        /// The register.
        /// </summary>
        /// <param name="builder">
        /// The builder.
        /// </param>
        /// <param name="typeFinder">
        /// The type finder.
        /// </param>
        public virtual void Register(ContainerBuilder builder, ITypeFinder typeFinder)
        {
            builder.RegisterType<UsaEpayService>().As<IUsaEpayService>().InstancePerDependency();
        }

        #endregion
    }
}